package com.qys.livesMall.shop.controller.sys;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qys.livesMall.common.result.R;
import com.qys.livesMall.framework.view.QysPage;
import com.qys.livesMall.shop.modal.dto.shop.rw.AuditRw;
import com.qys.livesMall.shop.modal.dto.shop.rw.ShopRwSearch;
import com.qys.livesMall.shop.modal.dto.shop.rwnew.ShopWlSearch;
import com.qys.livesMall.shop.modal.dto.shop.rwnew.ShopRechargeSearch;
import com.qys.livesMall.shop.modal.vo.ShopRechargeWithdrawalVO;
import com.qys.livesMall.shop.modal.vo.rw.RechargeVO;
import com.qys.livesMall.shop.modal.vo.ShopWithdrawalsStatisticsVO;
import com.qys.livesMall.shop.service.H2ShopRechargeWithdrawalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 后台管理 店铺充值提现
 *
 * @author
 * @since 2023-06-06
 */
@RestController
@RequestMapping("/web/shop/rw")
public class WebH2ShopRechargeWithdrawalController {

    @Autowired
    private H2ShopRechargeWithdrawalService rechargeWithdrawalService;

    /**
     * 充值提现列表
     * @param rwSearch
     * @return
     */
    @PostMapping("/list")
    public R<QysPage<ShopRechargeWithdrawalVO>> search(@RequestBody ShopRwSearch rwSearch){
        return R.ok(rechargeWithdrawalService.search(rwSearch));
    }

    /**
     * 审核通过
     * @param auditRw
     * @return
     */
    @PostMapping("/auditPass")
    public R auditPass(@RequestBody AuditRw auditRw){
        return rechargeWithdrawalService.auditPass(auditRw);
    }

    /**
     * 审核不通过
     * @param auditRw
     * @return
     */
    @PostMapping("/auditNoPass")
    public R auditNoPass(@RequestBody AuditRw auditRw){
        return rechargeWithdrawalService.auditNoPass(auditRw);
    }


    /**
     * 充值列表-new
     * @param reSearch
     * @return
     */
    @PostMapping("/shopRechargeStatistics")
    public R<Page<RechargeVO>> shopRechargeStatistics(@RequestBody ShopRechargeSearch reSearch){
        return R.ok(rechargeWithdrawalService.shopRechargeStatistics(reSearch));
    }

    /**
     * 提现列表-new
     * @param rwSearch
     * @return
     */
    @PostMapping("/shopWithdrawalsStatistics")
    public R<Page<ShopWithdrawalsStatisticsVO>> shopWithdrawalsStatistics(@RequestBody ShopWlSearch rwSearch){
        return R.ok(rechargeWithdrawalService.shopWithdrawalsStatistics(rwSearch));
    }

}
